<?php include "CacheFile_Begin.php";?>
<?php
//ob_start('ob_gzhandler');  

$lang="vi";
$lang_arr=array("vi","en");
if (isset($_GET['lang']) == true){
  if (in_array($_GET['lang'], $lang_arr)==true) $lang = $_GET['lang'];
}
elseif (isset($_COOKIE['lang']) == true){ 
 if (in_array($_COOKIE['lang'],$lang_arr)==true) $lang = $_COOKIE['lang'];
}
elseif (isset($_SESSION['lang']) == true){ 
 if (in_array($_SESSION['lang'],$lang_arr) == true) $lang = $_SESSION['lang'];
}
$_SESSION['lang'] = $lang;
setcookie('lang' , $lang , time()+60*60*24*30);

require "lang_$lang.php";
ob_start();
include "home.php";
$str=ob_get_clean();

$str = str_replace("{Site_Title}" , Site_Title , $str);
$str = str_replace("{Homnay}" , Homnay , $str);
$str = str_replace("{HomNay_JS}" , HomNay_JS , $str);
$str = str_replace("{Copyright}" , Copyright , $str);
$str = str_replace("{Address}" , Address , $str);
$str = str_replace("{Visitors}" , Visitors , $str);
$str = str_replace("{HomePage}" , Homepage , $str);
$str = str_replace("{DangNhap}" , DangNhap , $str);
$str = str_replace("{TinXemNhieu}" , TinXemNhieu , $str);
$str = str_replace("{TimKiem_Caption}" , TimKiem_Caption , $str);
$str = str_replace("{TuKhoa}" , TuKhoa , $str);
$str = str_replace("{TimKiem_FromDate}" , TimKiem_FromDate , $str);
$str = str_replace("{TimKiem_ToDate}" , TimKiem_ToDate , $str);
$str = str_replace("{TimKiem_Submit}" , TimKiem_Submit , $str);
$str = str_replace("{LoiHayYDep}" , LoiHayYDep , $str);
$str = str_replace("{Poll}" , Poll , $str);
$str = str_replace("{KetQuaTimKiem}" , KetQuaTimKiem , $str);
//menu
$str = str_replace("{Trang chu}" , Trangchu , $str);
$str = str_replace("{Gioi thieu}" , GioiThieu , $str);
$str = str_replace("{Lien he}" , LienHe , $str);
echo $str;

?>
<?php include "CacheFile_End.php";?>